Screen Coordinates

Engine uses float-based, resolution independent screen coordinates.

This means that the screen coordinates are not per-pixel.


Please see the following image with screen proportions highlighted:


Under default engine settings the visible screen has:

You can also notice that:

 


Working with Different Resolutions

When designing a Gui System you can assume that no matter which resolution you'll choose:

Meaning that some monitors will give more horizontal space on the left and right sides.



Window Child Coordinates

In the Gui Desktop the (0,0) position specifies the center of the accessible area.

Gui Child Objects (like Text or Button) in Gui Windows are positioned relatively to the Gui Windows, and there the (0,0) position is not the Window center, but the Window top left corner:

 


Programming

At all times visible screen range can be accessed by engine methods D.w() and D.h(), which specify:


Screen Coordinates can be modified by some of engine methods: